﻿using FluentValidation;
using Mes.Application.DTO.Inputs.MasterData;

namespace Mes.Application.Web.Validators.ProductionUnitValidators
{
    public class ProductionUnitInputValidator : AbstractValidator<ProductionUnitInput>
    {
        public ProductionUnitInputValidator()
        {
            RuleFor(x => x.ProductionUnitName)
                .NotEmpty().WithMessage("ProductionUnitName不能为空");

            RuleFor(x => x.ProductionUnitCode)
                .NotEmpty().WithMessage("ProductionUnitCode不能为空");
        }
    }
}
